package com.daoserver.mq;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.messaging.Message;

@EnableBinding(InPutBarista.class)
public class RabbitReceiver {
	private static final Log logger = LogFactory.getLog(RabbitReceiver.class);

	@StreamListener(InPutBarista.INPUT_MESSAGE_CHANNEL)
	public void receiver(Message<String> message) {
		String obj = message.getPayload();
		logger.info("接受对象:" + obj);
	}
}